using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Data;
using DTO;

namespace Business
{
    public class spt_monitorService
    {




		//////////////////////////////////////////////////////////

 		                                                         

		//            Enter code your here                      //

		                                                         

		//////////////////////////////////////////////////////////

        static public int GetIdentity()
        {
            Data.spt_monitorRepository repo = new spt_monitorRepository();
            return repo.GetIdentity();
        }

        static public int Count()
        {
            return spt_monitorRepository.Count();
        }
        public static void Them(spt_monitorDTO objDTO)
        {
            try
            {
                spt_monitorRepository repo = new spt_monitorRepository();
                repo.Them(objDTO);
            }
            catch (System.Exception )
            {
            }
        }

        public static void Xoa(int Maspt_monitor)
        {
            try
            {
                spt_monitorRepository Repo = new spt_monitorRepository();
                Repo.Xoa(Maspt_monitor);
            }
            catch (System.Exception )
            {
            }
        }

        public static void CapNhat(spt_monitorDTO objDTO)
        {
            try
            {
                spt_monitorRepository Repo = new spt_monitorRepository();
                Repo.CapNhat(objDTO);
            }
            catch (System.Exception )
            {
            }
        }

        public static List<spt_monitorDTO> LayDanhSach()
        {
            List<spt_monitorDTO> lst = new List<spt_monitorDTO>();
            try
            {
                spt_monitorRepository obj = new spt_monitorRepository();
                lst = obj.LayDanhSach();
            }
            catch (System.Exception )
            {
            }
            return lst;
        }

        static public List<spt_monitorDTO> LayDanhSach(int Start, int Record)
        {
             Data.spt_monitorRepository repo = new spt_monitorRepository();
            return repo.LayDanhSach(Start, Record);
        }

        public static spt_monitorDTO LayTheoMa(int Maspt_monitor)
        {
            spt_monitorDTO objDTO = new spt_monitorDTO();
            try
            {
                spt_monitorRepository Repo = new spt_monitorRepository();
                objDTO = Repo.LayTheoMa(Maspt_monitor);
            }
            catch (System.Exception )
            {
            }
            return objDTO;
        }
    }
}

